<template>
  <router-view></router-view>
</template>

<script>
import { assertLogin } from '@/utils/assert.js';

export default {
  name: 'App',
  mounted () {
    assertLogin().then(flag => {
      if(flag) {
        window.onload = () => {
          this.$store.commit("welcome");
        }
      }
      else window.open('/', '_self');
    });
  },
}
</script>

<style lang="less">
@import '@/assets/style/reset.css';
@import '@/assets/iconfont/iconfont.css';
@import '@/assets/style/base.css';

#app {
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}
</style>
